import {
	GetALLDetailInfo
} from '@/api/chat.js'
const state = {
	userinfo: {}
}
const mutations = {
	//保存用户信息
	saveUser(state, data) {
		state.userinfo = data;
	}
}
const actions = {
	// 拿到用户信息
	async GetUserInfo(context) {
		let res = await GetALLDetailInfo();
		if (res.data.code == 0) {
			context.commit('saveUser', res.data.result);
			console.log(res.data.result)
			return 'ok'
		} else {
			return 'fail'
		}
	}

}
const getter = {

}

export default {
	state,
	actions,
	mutations,
	getter
}
